package com.tedu.pj.common.annotation;

import com.tedu.pj.common.validator.Validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/21
 */
@Target({ElementType.FIELD,ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {Validator.class})
public @interface Validation {

    String message() default "";

    String contains() default "";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
